Optimal. Leaf size=35 \[ -\frac {3 \tanh ^{-1}(\cos (x))}{8 a}-\frac {3 \cot (x) \csc (x)}{8 a}-\frac {\cot (x) \csc ^3(x)}{4 a} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.04, antiderivative size = 35, normalized size of antiderivative = 1.00, number of steps
used = 4, number of rules used = 3, integrand size = 16, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.188, Rules used = {3254, 3853,
3855} \begin {gather*} -\frac {3 \tanh ^{-1}(\cos (x))}{8 a}-\frac {\cot (x) \csc ^3(x)}{4 a}-\frac {3 \cot (x) \csc (x)}{8 a} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 3254
Rule 3853
Rule 3855
Rubi steps
\begin {align*} \int \frac {\csc ^3(x)}{a-a \cos ^2(x)} \, dx &=\frac {\int \csc ^5(x) \, dx}{a}\\ &=-\frac {\cot (x) \csc ^3(x)}{4 a}+\frac {3 \int \csc ^3(x) \, dx}{4 a}\\ &=-\frac {3 \cot (x) \csc (x)}{8 a}-\frac {\cot (x) \csc ^3(x)}{4 a}+\frac {3 \int \csc (x) \, dx}{8 a}\\ &=-\frac {3 \tanh ^{-1}(\cos (x))}{8 a}-\frac {3 \cot (x) \csc (x)}{8 a}-\frac {\cot (x) \csc ^3(x)}{4 a}\\ \end {align*}
________________________________________________________________________________________
Mathematica [B] Leaf count is larger than twice the leaf count of optimal. \(75\) vs. \(2(35)=70\).
time = 0.01, size = 75, normalized size = 2.14 \begin {gather*} \frac {-\frac {3}{32} \csc ^2\left (\frac {x}{2}\right )-\frac {1}{64} \csc ^4\left (\frac {x}{2}\right )-\frac {3}{8} \log \left (\cos \left (\frac {x}{2}\right )\right )+\frac {3}{8} \log \left (\sin \left (\frac {x}{2}\right )\right )+\frac {3}{32} \sec ^2\left (\frac {x}{2}\right )+\frac {1}{64} \sec ^4\left (\frac {x}{2}\right )}{a} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.10, size = 52, normalized size = 1.49
method | result | size |
default | \(\frac {\frac {1}{16 \left (\cos \left (x \right )+1\right )^{2}}+\frac {3}{16 \left (\cos \left (x \right )+1\right )}-\frac {3 \ln \left (\cos \left (x \right )+1\right )}{16}-\frac {1}{16 \left (-1+\cos \left (x \right )\right )^{2}}+\frac {3}{16 \left (-1+\cos \left (x \right )\right )}+\frac {3 \ln \left (-1+\cos \left (x \right )\right )}{16}}{a}\) | \(52\) |
norman | \(\frac {-\frac {1}{64 a}-\frac {\tan ^{2}\left (\frac {x}{2}\right )}{8 a}+\frac {\tan ^{6}\left (\frac {x}{2}\right )}{8 a}+\frac {\tan ^{8}\left (\frac {x}{2}\right )}{64 a}}{\tan \left (\frac {x}{2}\right )^{4}}+\frac {3 \ln \left (\tan \left (\frac {x}{2}\right )\right )}{8 a}\) | \(58\) |
risch | \(\frac {3 \,{\mathrm e}^{7 i x}-11 \,{\mathrm e}^{5 i x}-11 \,{\mathrm e}^{3 i x}+3 \,{\mathrm e}^{i x}}{4 \left ({\mathrm e}^{2 i x}-1\right )^{4} a}+\frac {3 \ln \left ({\mathrm e}^{i x}-1\right )}{8 a}-\frac {3 \ln \left ({\mathrm e}^{i x}+1\right )}{8 a}\) | \(71\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.27, size = 51, normalized size = 1.46 \begin {gather*} \frac {3 \, \cos \left (x\right )^{3} - 5 \, \cos \left (x\right )}{8 \, {\left (a \cos \left (x\right )^{4} - 2 \, a \cos \left (x\right )^{2} + a\right )}} - \frac {3 \, \log \left (\cos \left (x\right ) + 1\right )}{16 \, a} + \frac {3 \, \log \left (\cos \left (x\right ) - 1\right )}{16 \, a} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] Leaf count of result is larger than twice the leaf count of optimal. 72 vs.
\(2 (29) = 58\).
time = 0.39, size = 72, normalized size = 2.06 \begin {gather*} \frac {6 \, \cos \left (x\right )^{3} - 3 \, {\left (\cos \left (x\right )^{4} - 2 \, \cos \left (x\right )^{2} + 1\right )} \log \left (\frac {1}{2} \, \cos \left (x\right ) + \frac {1}{2}\right ) + 3 \, {\left (\cos \left (x\right )^{4} - 2 \, \cos \left (x\right )^{2} + 1\right )} \log \left (-\frac {1}{2} \, \cos \left (x\right ) + \frac {1}{2}\right ) - 10 \, \cos \left (x\right )}{16 \, {\left (a \cos \left (x\right )^{4} - 2 \, a \cos \left (x\right )^{2} + a\right )}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} - \frac {\int \frac {\csc ^{3}{\left (x \right )}}{\cos ^{2}{\left (x \right )} - 1}\, dx}{a} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 0.41, size = 47, normalized size = 1.34 \begin {gather*} -\frac {3 \, \log \left (\cos \left (x\right ) + 1\right )}{16 \, a} + \frac {3 \, \log \left (-\cos \left (x\right ) + 1\right )}{16 \, a} + \frac {3 \, \cos \left (x\right )^{3} - 5 \, \cos \left (x\right )}{8 \, {\left (\cos \left (x\right )^{2} - 1\right )}^{2} a} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 0.08, size = 39, normalized size = 1.11 \begin {gather*} -\frac {3\,\mathrm {atanh}\left (\cos \left (x\right )\right )}{8\,a}-\frac {\frac {5\,\cos \left (x\right )}{8}-\frac {3\,{\cos \left (x\right )}^3}{8}}{a\,{\cos \left (x\right )}^4-2\,a\,{\cos \left (x\right )}^2+a} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________